/*
	File: CTileManager
	Author: Nolan McGlynn( GearMonster1 )
	Class: SGP1 1303
	Purpose: To Manage all the tiles that the player and enmies 
			 will interact with on the screen and render them accordingly
*/
#pragma once

#include <string>
#include <vector>
class CTile;
class CSGD_TextureManager;
class CSGD_Direct3D;
class CEntity;

class CTileManager
{
public:

	static CTileManager* GetInstance( void );

	void Render( void );

	// Accepts a string to find the XML and read in the tiles
	void ReadLevel( std::string XMLFilePath );

	// Shuts down the manager and cleans up the level
	void Shutdown( void );

	// recieve a copy of the vector holding all of the event tiles
	std::vector<CTile*> RecieveEventLayer( void );

	// Recieve an entity to check collision against tiles for
	void CheckCollsion( CEntity* pOther );

private:

	CTileManager(void);
	~CTileManager(void);

	// Create an array pointers of tiles for rendering and to allow for upcasting
	std::vector<CTile*> m_vectorTilesFirstLayer;
	std::vector<CTile*> m_vectorTilesSecondLayer;
	std::vector<CTile*> m_vectorTilesThirdLayer;
	// Define the size of the world
	int m_nMapWidth;
	int m_nMapHeight;
	// Define the size of the tiles
	int m_nTileWidth;
	int m_nTileHeight;

	int m_nTileImageID;


	// Managers and SGD Wrappers
	CSGD_TextureManager*	m_pTM;
	CSGD_Direct3D*			m_D3D;
};	

